package com.xingkeduo.business.common.controller;

import com.xingkeduo.business.common.domain.CommonDomain;
import com.xingkeduo.util.pojo.base.BaseController;
import com.xingkeduo.util.pojo.domain.EnumJTO;
import com.xingkeduo.util.tool.ReturnUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @Author:gaozifeng
 * @Date 2019/3/22 10:26
 **/
@RestController
@RequestMapping("/enum/bank")
public class BankTypeController extends BaseController {
    @Autowired
    private CommonDomain commonDomain;

    /**
     * 查询接口
     *
     * @author 高子峰
     * @time 2019年3月22日10:28:47
     * @param
     * @return
     */
    @GetMapping
    public String doGet() {
        returnUtil = new ReturnUtil();
        try {
            return returnUtil.getSuccess(EnumJTO.toJsonBank(commonDomain.getBankType()));
        } catch (Throwable t) {
            return dealException(t, returnUtil);
        }
    }
}
